package cn.iocoder.yudao.hires.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.hires.entity.ResumeEvaluationDO;
import cn.iocoder.yudao.hires.vo.ResumeEvaluationPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 简历-自我评价 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface ResumeEvaluationMapper extends BaseMapperX<ResumeEvaluationDO> {

    default PageResult<ResumeEvaluationDO> selectPage(ResumeEvaluationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ResumeEvaluationDO>()
                .eqIfPresent(ResumeEvaluationDO::getUserId, reqVO.getUserId())
                .eqIfPresent(ResumeEvaluationDO::getSelfEvaluation, reqVO.getSelfEvaluation())
                .betweenIfPresent(ResumeEvaluationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ResumeEvaluationDO::getId));
    }

}